﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ManageEmployees.Properties;

namespace ManageEmployees
{
    public partial class fBase : XtraForm
    {
        public fBase()
        {
            InitializeComponent();
        }

        #region Events
        private void fBase_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (XtraMessageBox.Show(Resources.FormExit, Resources.Notification, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                Dispose();
                e.Cancel = false;
            }
            else
            {
                e.Cancel = true;
            }
        }

        private void fBase_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                Close();
            }
        }
        #endregion
    }
}